package com.qqtech.qquan.mall.service;

import java.util.List;

import com.qqtech.core.frame.service.BaseService;
import com.qqtech.qquan.mall.model.MallProductSpec;
import com.qqtech.qquan.mall.model.MallProductSpecVo;

public interface MallProductSpecService extends BaseService<MallProductSpec> {
	
	/**
	 * 根据产品Id获取产品规格信息
	 * @param productId
	 * @return
	 */
	public List<MallProductSpecVo> queryListByProductId(Integer productId);
	
	 /**
     * 减少商品库存量
     *
     * @param specId
     * @param quantity
     * @return
     */
    int handleReduceStock(int specId, int quantity);

    /**
     * 返回商品库存量(订单取消或退款后操作)
     *
     * @param specId
     * @param quantity
     * @return
     */
    int handleReturnStock(int specId, int quantity);
}